/**
  * @file     	main.c
  * @author   	YangHaifeng
  * @email   	2995339193@qq.com
  * @version	V0.0
  * @license  	GNU General Public License (GPL)  
  * @detail		please follow the license!!!
  * @attention
  *  this file is aim to do something with main									
  *   																	
  * @htmlonly 
  * <span style="font-weight: bold">History</span> 
  * @endhtmlonly 
  * Version|Auther|Describe
  * ------|----|-------- 
  * V0.0|YangHaifeng|Create File
  * <h2><center>&copy;COPYRIGHT YangHaifeng All Rights Reserved.</center></h2>
  */ 
  
  
  
#include "driverlib.h"
#include <stdint.h>
#include <stdbool.h>
#include "buzzer.h"
#include "delay.h"
#include "encoder.h"
#include "oled.h"
#include "key.h"
#include "led.h"
#include "menu.h"
#include "motor.h"
#include "openmv.h"
#include "pid.h"
#include "system.h"
#include "task.h"
#include "timer.h"
#include "zigbee.h"



/**
 * @brief 主函数
 * @param None
 * @retval 正常不会返回
 * @author YangHaifeng
 */
int main(void)
{
    SysInit();
	delay_init();
	OLED_Init();
	zigbee_init();
	buzzer_init();
	led_init();
	key_init();
	encoder_init();
	motor_dir_init();
	motor_pwm_init();
	main_menu();
	openmv_init();
	for(int i=0;i<8;i++)
	{
		UART_transmitData(EUSCI_A0_BASE,(uint8_t)(0X60|option)); 
	}
	timer_init(TIMER32_PRESCALER_1,119999);
	while(1)
	{
		OLED_Print(1,1,"L:%8d",encoder_L);
		OLED_Print(2,1,"R:%8d",encoder_R);
		OLED_Print(3,1,"rho:%8d",openmv.rho);
	}
}





